/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dalInterface;

import chat.TextChatMessage;
import java.rmi.Remote;
import java.rmi.RemoteException;
import utils.DataTable;

/**
 *
 * @author Mrkupi
 */
public interface DALMessage extends Remote
{
    void addNewMessage(TextChatMessage msg) throws RemoteException;

    DataTable getAllMessagesFrom(String sender) throws RemoteException;
    DataTable getAllMessageTo(String receiver) throws RemoteException;
    DataTable getConversation(String sender, String receiver) throws RemoteException;
    
    DataTable getLimitedConversation(String sender, String receiver, int nMessages) throws RemoteException;
    DataTable getLimitedMessagesFrom(String sender, int nMessages) throws RemoteException;
    DataTable getLimitedMessageTo(String receiver, int nMessages) throws RemoteException;
}
